﻿namespace HCore
{
    public abstract class DisplayGameEntity : BaseGameEntity
    {
        private DisplayObject _displayObject;
        
        public virtual void Update(Fix deltaTime)
        {
            _displayObject?.Update();
        }

        public override void Dispose()
        {
            _displayObject?.Dispose();
        }
        
        protected DisplayGameEntity(int eType, HGame game) : base(eType, game)
        {
            _displayObject = DisplayObjectFactory.CreateDisplayObject(this);
        }
    }
}